package com.txunda.zhuohired.bean.user.home;

import android.support.annotation.NonNull;

import java.util.List;

/**
 * 创建人： Txd_Cjh
 * 创建时间： 2018/4/17 9:36
 * 功能描述：城市bean
 * 联系方式：jiahuanchen@126.com
 */

public class CityBean {

    /**
     * code : 1
     * message : 成功
     * data : [{"id":"36","letter":"A","region_name":"安庆市"},{"id":"37","letter":"B","region_name":"蚌埠市"},{"id":"38",
     * "letter":"C","region_name":"巢湖市"},{"id":"39","letter":"C","region_name":"池州市"},{"id":"40","letter":"C",
     * "region_name":"滁州市"},{"id":"41","letter":"F","region_name":"阜阳市"},{"id":"42","letter":"H",
     * "region_name":"淮北市"},{"id":"43","letter":"H","region_name":"淮南市"},{"id":"44","letter":"H",
     * "region_name":"黄山市"},{"id":"45","letter":"L","region_name":"六安市"},{"id":"46","letter":"M",
     * "region_name":"马鞍山市"},{"id":"47","letter":"S","region_name":"宿州市"},{"id":"48","letter":"T",
     * "region_name":"铜陵市"},{"id":"49","letter":"W","region_name":"芜湖市"},{"id":"50","letter":"X",
     * "region_name":"宣城市"},{"id":"51","letter":"Z","region_name":"亳州市"},{"id":"52","letter":"B",
     * "region_name":"北京市"},{"id":"53","letter":"F","region_name":"福州市"},{"id":"54","letter":"L",
     * "region_name":"龙岩市"},{"id":"55","letter":"N","region_name":"南平市"},{"id":"56","letter":"N",
     * "region_name":"宁德市"},{"id":"57","letter":"P","region_name":"莆田市"},{"id":"58","letter":"Q",
     * "region_name":"泉州市"},{"id":"59","letter":"S","region_name":"三明市"},{"id":"60","letter":"X",
     * "region_name":"厦门市"},{"id":"61","letter":"Z","region_name":"漳州市"},{"id":"62","letter":"L",
     * "region_name":"兰州市"},{"id":"63","letter":"B","region_name":"白银市"},{"id":"64","letter":"D",
     * "region_name":"定西市"},{"id":"65","letter":"G","region_name":"甘南市"},{"id":"66","letter":"J",
     * "region_name":"嘉峪关市"},{"id":"67","letter":"J","region_name":"金昌市"},{"id":"68","letter":"J",
     * "region_name":"酒泉市"},{"id":"69","letter":"L","region_name":"临夏市"},{"id":"70","letter":"L",
     * "region_name":"陇南市"},{"id":"71","letter":"P","region_name":"平凉市"},{"id":"72","letter":"Q",
     * "region_name":"庆阳市"},{"id":"73","letter":"T","region_name":"天水市"},{"id":"74","letter":"W",
     * "region_name":"武威市"},{"id":"75","letter":"Z","region_name":"张掖市"},{"id":"76","letter":"G",
     * "region_name":"广州市"},{"id":"77","letter":"S","region_name":"深圳市"},{"id":"78","letter":"C",
     * "region_name":"潮州市"},{"id":"79","letter":"D","region_name":"东莞市"},{"id":"80","letter":"F",
     * "region_name":"佛山市"},{"id":"81","letter":"H","region_name":"河源市"},{"id":"82","letter":"H",
     * "region_name":"惠州市"},{"id":"83","letter":"J","region_name":"江门市"},{"id":"84","letter":"J",
     * "region_name":"揭阳市"},{"id":"85","letter":"M","region_name":"茂名市"},{"id":"86","letter":"M",
     * "region_name":"梅州市"},{"id":"87","letter":"Q","region_name":"清远市"},{"id":"88","letter":"S",
     * "region_name":"汕头市"},{"id":"89","letter":"S","region_name":"汕尾市"},{"id":"90","letter":"S",
     * "region_name":"韶关市"},{"id":"91","letter":"Y","region_name":"阳江市"},{"id":"92","letter":"Y",
     * "region_name":"云浮市"},{"id":"93","letter":"Z","region_name":"湛江市"},{"id":"94","letter":"Z",
     * "region_name":"肇庆市"},{"id":"95","letter":"Z","region_name":"中山市"},{"id":"96","letter":"Z",
     * "region_name":"珠海市"},{"id":"97","letter":"N","region_name":"南宁市"},{"id":"98","letter":"G",
     * "region_name":"桂林市"},{"id":"99","letter":"B","region_name":"百色市"},{"id":"100","letter":"B",
     * "region_name":"北海市"},{"id":"101","letter":"C","region_name":"崇左市"},{"id":"102","letter":"F",
     * "region_name":"防城港市"},{"id":"103","letter":"G","region_name":"贵港市"},{"id":"104","letter":"H",
     * "region_name":"河池市"},{"id":"105","letter":"H","region_name":"贺州市"},{"id":"106","letter":"L",
     * "region_name":"来宾市"},{"id":"107","letter":"L","region_name":"柳州市"},{"id":"108","letter":"Q",
     * "region_name":"钦州市"},{"id":"109","letter":"W","region_name":"梧州市"},{"id":"110","letter":"Y",
     * "region_name":"玉林市"},{"id":"111","letter":"G","region_name":"贵阳市"},{"id":"112","letter":"A",
     * "region_name":"安顺市"},{"id":"113","letter":"B","region_name":"毕节市"}]
     */

    private String code;
    private String message;
    private List<DataBean> data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Comparable{
        /**
         * id : 36
         * letter : A
         * region_name : 安庆市
         */

        private String id;
        private String letter;
        private String region_name;
        private String sortLetters;//显示数据拼音的首字母

        public String getSortLetters() {
            return sortLetters;
        }

        public void setSortLetters(String sortLetters) {
            this.sortLetters = sortLetters;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getLetter() {
            return letter;
        }

        public void setLetter(String letter) {
            this.letter = letter;
        }

        public String getRegion_name() {
            return region_name;
        }

        public void setRegion_name(String region_name) {
            this.region_name = region_name;
        }

        @Override
        public String toString() {
            return "DataBean{" +
                    "id='" + id + '\'' +
                    ", letter='" + letter + '\'' +
                    ", region_name='" + region_name + '\'' +
                    '}';
        }

        @Override
        public int compareTo(@NonNull Object o) {

            DataBean sdto = (DataBean)o;

            String otherAge = sdto.getSortLetters();
            // note: enum-type's comparation depend on types' list order of enum method
            // so, if compared property is enum-type ,then its comparationfollow ObjEnum.objType order


            return this.sortLetters.compareTo(otherAge);
        }
    }

    @Override
    public String toString() {
        return "CityBean{" +
                "code='" + code + '\'' +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
